import axios from 'axios'


// create an axios instance
const service = axios.create({
  baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
  // withCredentials: true, // send cookies when cross-domain requests
  timeout: 5000 // request timeout
})


service.interceptors.request.use(
  config => {
  

   
    return config
  },
  error => {
   
    return Promise.reject(error)
  }
)


service.interceptors.response.use(

  response => {
   
      return response
    
  },
  error => {
    
    return Promise.reject(error)
  }
)

export default service
